#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
int m=0;
int main()
{
    printf("father->child\n");
    int id=fork();
    while(1)
    {
        if(id==0)
        {
            printf("child:%d\n",m);
            m+=10;
            sleep(1);
        }
        else
        {
            printf("father:%d\n",m);
            m+=1;
            sleep(1);
        }
    }       
    return 0;
}
